import { createSSRApp } from "vue";
import App from "./App.vue";
import { createPinia } from 'pinia'
// 导入pinia持久化插件
import { createUnistorage} from 'pinia-plugin-unistorage'

export function createApp() {
  // 创建pinia实例对象(插件)
  const pinia = createPinia();
  // 在pinia中使用持久化插件
  pinia.use(createUnistorage())
  const app = createSSRApp(App);
  app.use(pinia);
  return {
    app,
  };
}
